<%@page import="youleche.com.caches.CacheFactory"%>
<%@page import="youleche.com.model.MVehicleImageInfo"%>
<%@page import="youleche.com.model.MArea"%>
<%@page import="youleche.com.external.IpToCityServlet"%>
<%@page import="youleche.com.controler.controler.PageDataForBussinessControler"%>
<%@page import="youleche.com.model.MVehicleInfo"%>
<%@page import="java.util.List"%>
<%@page import="youleche.com.business.BVehicleInfo"%>
<%@ page language="java" contentType="text/html;charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="base.jsp"%>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="keywords" content="美乐车,电动车报价,自行车报价,出租自行车,出租电动车,美乐车租车，车辆售后服务" />
<meta name="description" content="美乐车,美乐车租车，电动车报价,自行车报价，出租自行车，出租电动车，全国最大的车辆交易信息网站" />
<title>美乐车-全国最大的车辆信息交易平台</title>
<link href="image/meileche.jpg" rel="shortcut icon"/>

<link rel="stylesheet" href="FlexSlider/flexslider.css" media="screen" />
<link rel="stylesheet" href="js/meilecheTop/css/meilecheTop.1.0.css" media="screen" />
<link rel="stylesheet" href="css/home.css"/>
<script type="text/javascript" src="js/common/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/common/jquery.cookie.js"></script>
<script type="text/javascript" src="FlexSlider/jquery.flexslider-min.js"></script>
<script type="text/javascript" src="js/meilecheTop/js/meilecheTop.1.0.js"></script>
<script type="text/javascript" src="layer/layer.js"></script>
<script type="text/javascript" src="js/home.js"></script>
<script type="text/javascript">
	
	function clearAddress(){
		$("#txtAddress").val('');
	}
	
	$(window).load(function() { 
		$('.flexslider').flexslider({  
			 controlNav: false
		});
	});
	
	
	function contactSeller(vehicleId){
		$.layer({
		    type: 2,
		    title: "联系店主（美乐车-全国最大的车辆信息交易平台）",
		    iframe: {src: 'che.do?id=' +vehicleId+'&action=4'},
		    area : ['1000px' , '500px'],
		    success : function(){
		        layer.shift('right', 400);	
		    }
		});
	}
	
	function btnFixs(){
		window.location.href="fixs.jsp";
	}
</script>
</head>
<body>
	<% String city = IpToCityServlet.getCityByIpForHome(IpToCityServlet.getIpAddr(request)); %>
	<% 
		List<MVehicleImageInfo> homelist = PageDataForBussinessControler.getHomeImageInfoForLunBo();
		if(homelist == null){
			return;
		}
	%>
	<div class="body">
		<div class="backgroundBody">
			<div class="top">
				<div class="topTitle">
					<div style="width: 400px; height: 80px; float: left;">
						<img src="image/ylc_logo.jpg" />
					</div>
					<div style="width: 600px; height: 80px; float: left;">
						<div
							style="width: 200px; height: 30px; float: left; color: #444; font-size: 14px;">
								<br/>
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><%= city %></b>[切换城市]
								<br/>
								<br/>
						全国最大的车辆信息交易平台</div>
						<div style="width: 150px; height: 80px; float: left;padding-top: 30px;">
									<a class="detail-btn2" href="list.jsp">发布信息</a>
						</div>
						<div
							style="width: 250px; height: 30px; float: left; padding-top: 50px; color: #444; font-size: 18px;"
							align="right" id="divInfo">
							<span id="loginandregister"><a href="login.jsp" id="linkLogin" style="color:#666;font-size:14px;">登陆</a>&nbsp;|&nbsp;<a href="register.jsp" id="linkRegister" style="color:#666;font-size:14px;">注册</a></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="help.jsp" style="color:#666;font-size:14px;">帮助</a>
						</div>
					</div>
				</div>
			</div>
			<div class="topNavigate">
				<div style="margin-left:auto;margin-right:auto;width:1000px;height:100%;">
					<div class="daohangDiv" onclick="btnFixs();">
						售后
					</div>
					<div class="daohangDiv" onclick="javascript:location.href='zcs.jsp'">
						租车
					</div>
					<div class="daohangDiv">
						
					</div>
					<div class="daohangDiv">
						
					</div>
					<div class="daohangDiv">
						
					</div>
					<div class="daohangDiv1">
						
					</div>
					<div class="daohangDiv1">
						
					</div>
					<div class="daohangDiv1">
						
					</div>
					<div class="daohangDiv1">
						
					</div>
					<div class="gouwucheDaohang" id="btnGouwuche" onclick="forwardShop();">
						<div style="float:left;height:46px;padding-top:10px;"><img src="image/gouwuche_small.jpg"/></div>
						<div style="float:left;height:46px;padding-top:4px;text-align:center;width:70px;">&nbsp;收藏车<br/>&nbsp;(<span id="numShopSmall">0</span>)</div>
						
					</div>
				</div>
			</div>
		</div>
		<div class="mainBody">
			<div class="area">
				<div class="areaSearch">
					<div class="state" align="center">寻找美乐中的车辆</div>
					<div class="houseNum" align="center">
						<span>123</span>座城市 <span><%=PageDataForBussinessControler.getSellerForCount()%></span>个商家 <span><%= PageDataForBussinessControler.getVehicleNameForCount() %></span>个品牌
					</div>
					<input type="text" id="txtAddress" class="txtAddress"
						value="请输入品牌"  onmousedown="clearAddress();"/><br />
					<div
						style="float: left; width: 89px; margin-right: 9px; margin-top: 5px; font-size: 15px; font-weight: bold; color: #037b00;"
						align="right">
						<label> 热门位置:</label>
					</div>
					<div style="float: left; width: 278px;height:80px;" class="address">
					<%
						List<MArea> list = PageDataForBussinessControler.getHotAreaByCity(city);
						if(list != null){
							for(int i=0; i< list.size();i++){%>
								<div style="width:90px;line-height:24px;float:left;"><a><%= list.get(i).getAreaName() %></a></div>
							
						<%
							if(i == 7){%>
								<div style="width:90px;line-height:24px;float:left;"><a>更多>></a></div>
								<%
								break;
							}else{
								continue;
							}
							}
						}
					%>
						 
					</div>
					<br /> <input type="hidden" id="hidAdd" value="none"/><input type="button" class="btnSearch" value="立即搜索" onclick="search();" />
				</div>
				<div class="areaImg" style="width: 600px;">
					<%-- <img src="<%=homelist.get(0).getImagePath() %>" style="width:100%;height:100%;"/> --%>

					<div class="flexslider" style="float:left;">
						<ul class="slides"> 
						   <%
							for(MVehicleImageInfo img : homelist){%>
								<li> <img src="<%=img.getImagePath() %>" style="width:100%;height:100%;"/></li>
							<%}
						%>
						</ul>
					</div>
				</div>				
			</div>
			<div class="cityArea">美乐车信息</div>
			<%@include file="homevehicles.jsp" %>
			
		</div>
		
		<div style="width:100%;height:60px;">
			<div style="margin-top:20px;margin-left:auto;margin-right:auto;width:1000px;height:60px;">
				<div style="float:left;width:480px;margin-right:20px;text-align:right;" id="divPre">
				<img src="image/btn_pre1.png" style="cursor:pointer;" onclick="prePage();"/>
				</div>
				<div style="float:left;width:480px;margin-left:20px;" id="divNext">
				<img src="image/btn_next1.png" style="cursor:pointer;" onclick="nextPage();"/>
				</div>
			</div>
		</div>
		<div class="bottom">
			<div style="margin-left:auto;margin-right:auto;width: 1000px;">
				<div style="width: 150px; float: left; margin-top: 10px;">
					<ul>
						<li class="liHeader"><a href="aboutme.jsp">关于我们</a></li>
					</ul>
				</div>
				<div style="width: 150px; float: left; margin-top: 10px;">
					<ul>
						<li class="liHeader"><a href="ad.jsp">广告合作</a></li>
					</ul>
				</div>
				<div style="width: 150px; float: left; margin-top: 10px;">
					<ul>
						<li class="liHeader"><a href="vip.jsp">网站条款</a></li>
					</ul>
				</div>
				<div style="width: 150px; float: left; margin-top: 10px;">
					<ul>
						<li class="liHeader"><a href="sj.jsp">成为商家</a></li>
					</ul>
				</div>
				<div style="width: 150px; float: left; margin-top: 10px;">
					<ul>
						<li class="liHeader"><a href="jy.jsp">提出建议</a></li>
					</ul>
				</div>
				<div style="width: 150px; float: left; margin-top: 10px;">
					<ul>
						<li class="liHeader"><a href="more.jsp">更多>></a></li>
					</ul>
				</div>
				<div style="width: 250px; float: left; margin-top: 10px;"></div>
			</div>
			</div>
			<div style="background-color:#3CAC7E;color:#fff;float:left;width:100%;text-align:center;">
			
			@2014 美乐车(www.meileche.com)   蜀ICP备13007100号
	
			</div>
	</div>
	
	
	
</body>
</html>
